﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mania4key_v2
{
    class OsuMaps
    {
        public List<OsuMap> maps = new List<OsuMap>();
        public OsuMaps(String f)
        {
            var fileList = new DirectoryInfo(f).GetFiles("*.osu", SearchOption.AllDirectories);
            foreach (var files in fileList)
            {
                OsuMap newmap = new OsuMap(files.FullName);
                newmap.path = Path.GetDirectoryName(files.FullName);
                if ((newmap.keyamount == 4) && (newmap.mode == 3))
                {
                    maps.Add(newmap);
                }
            }
        }
        public void SaveToJson()
        {

        }
    }
}
